<h1>Docker import 命令</h1>
<p><strong>docker import :</strong> 从归档文件中创建镜像。</p>
<h3>语法</h3>
<pre><code class="language-Docker">docker import [OPTIONS] file|URL|- [REPOSITORY[:TAG]]</code></pre>
<p>OPTIONS说明：</p>
<ul>
<li><p><strong>-c :</strong>应用docker 指令创建镜像；</p><p></p></li>
<li><p><strong>-m :</strong>提交时的说明文字；</p><p></p></li>
</ul>
<h3>实例</h3>
<p>从镜像归档文件my_ubuntu_v3.tar创建镜像，命名为runoob/ubuntu:v4</p>
<pre><code class="language-Docker">runoob@runoob:~$ docker import  my_ubuntu_v3.tar runoob/ubuntu:v4  

sha256:63ce4a6d6bc3fabb95dbd6c561404a309b7bdfc4e21c1d59fe9fe4299cbfea39

runoob@runoob:~$ docker images runoob/ubuntu:v4

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
runoob/ubuntu       v4                  63ce4a6d6bc3        20 seconds ago      142.1 MB

</code></pre>

